// ███╗   ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗  ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║   ██║   ██║   ██║██║     █████╗  
// ██║╚██╗██║██║   ██║   ██║   ██║██║     ██╔══╝  
// ██║ ╚████║╚██████╔╝   ██║   ██║╚██████╗███████╗
// ╚═╝  ╚═══╝ ╚═════╝    ╚═╝   ╚═╝ ╚═════╝╚══════╝
// -----------------------------------------------
//  
// This file is automatically generated 
// Please do not edit these files manually
// Run the following in the root of the repos:
//
// 		*NIX 		:	./build.sh codegen
// 		Windows 	:	build.bat codegen
//
// -----------------------------------------------
// ReSharper disable RedundantUsingDirective
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Elasticsearch.Net;
using Elastic.Transport;
using static Elastic.Transport.HttpMethod;

// ReSharper disable InterpolatedStringExpressionIsNotIFormattable
// ReSharper disable once CheckNamespace
// ReSharper disable InterpolatedStringExpressionIsNotIFormattable
// ReSharper disable RedundantExtendsListEntry
namespace Elasticsearch.Net.Specification.EnrichApi
{
	///<summary>
	/// Enrich APIs.
	/// <para>Not intended to be instantiated directly. Use the <see cref = "IElasticLowLevelClient.Enrich"/> property
	/// on <see cref = "IElasticLowLevelClient"/>.
	///</para>
	///</summary>
	public class LowLevelEnrichNamespace : NamespacedClientProxy
	{
		internal LowLevelEnrichNamespace(ElasticLowLevelClient client): base(client)
		{
		}

		///<summary>DELETE on /_enrich/policy/{name} <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-enrich-policy-api.html</para></summary>
		///<param name = "name">The name of the enrich policy</param>
		///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
		public TResponse DeletePolicy<TResponse>(string name, DeleteEnrichPolicyRequestParameters requestParameters = null)
			where TResponse : class, ITransportResponse, new() => DoRequest<TResponse>(DELETE, Url($"_enrich/policy/{name:name}"), null, RequestParams(requestParameters));
		///<summary>DELETE on /_enrich/policy/{name} <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-enrich-policy-api.html</para></summary>
		///<param name = "name">The name of the enrich policy</param>
		///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
		[MapsApi("enrich.delete_policy", "name")]
		public Task<TResponse> DeletePolicyAsync<TResponse>(string name, DeleteEnrichPolicyRequestParameters requestParameters = null, CancellationToken ctx = default)
			where TResponse : class, ITransportResponse, new() => DoRequestAsync<TResponse>(DELETE, Url($"_enrich/policy/{name:name}"), ctx, null, RequestParams(requestParameters));
		///<summary>PUT on /_enrich/policy/{name}/_execute <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/execute-enrich-policy-api.html</para></summary>
		///<param name = "name">The name of the enrich policy</param>
		///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
		public TResponse ExecutePolicy<TResponse>(string name, ExecuteEnrichPolicyRequestParameters requestParameters = null)
			where TResponse : class, ITransportResponse, new() => DoRequest<TResponse>(PUT, Url($"_enrich/policy/{name:name}/_execute"), null, RequestParams(requestParameters));
		///<summary>PUT on /_enrich/policy/{name}/_execute <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/execute-enrich-policy-api.html</para></summary>
		///<param name = "name">The name of the enrich policy</param>
		///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
		[MapsApi("enrich.execute_policy", "name")]
		public Task<TResponse> ExecutePolicyAsync<TResponse>(string name, ExecuteEnrichPolicyRequestParameters requestParameters = null, CancellationToken ctx = default)
			where TResponse : class, ITransportResponse, new() => DoRequestAsync<TResponse>(PUT, Url($"_enrich/policy/{name:name}/_execute"), ctx, null, RequestParams(requestParameters));
		///<summary>GET on /_enrich/policy/{name} <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-get-policy.html</para></summary>
		///<param name = "name">A comma-separated list of enrich policy names</param>
		///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
		public TResponse GetPolicy<TResponse>(string name, GetEnrichPolicyRequestParameters requestParameters = null)
			where TResponse : class, ITransportResponse, new() => DoRequest<TResponse>(GET, Url($"_enrich/policy/{name:name}"), null, RequestParams(requestParameters));
		///<summary>GET on /_enrich/policy/{name} <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-get-policy.html</para></summary>
		///<param name = "name">A comma-separated list of enrich policy names</param>
		///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
		[MapsApi("enrich.get_policy", "name")]
		public Task<TResponse> GetPolicyAsync<TResponse>(string name, GetEnrichPolicyRequestParameters requestParameters = null, CancellationToken ctx = default)
			where TResponse : class, ITransportResponse, new() => DoRequestAsync<TResponse>(GET, Url($"_enrich/policy/{name:name}"), ctx, null, RequestParams(requestParameters));
		///<summary>GET on /_enrich/policy <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-get-policy.html</para></summary>
		///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
		public TResponse GetPolicy<TResponse>(GetEnrichPolicyRequestParameters requestParameters = null)
			where TResponse : class, ITransportResponse, new() => DoRequest<TResponse>(GET, "_enrich/policy", null, RequestParams(requestParameters));
		///<summary>GET on /_enrich/policy <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-get-policy.html</para></summary>
		///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
		[MapsApi("enrich.get_policy", "")]
		public Task<TResponse> GetPolicyAsync<TResponse>(GetEnrichPolicyRequestParameters requestParameters = null, CancellationToken ctx = default)
			where TResponse : class, ITransportResponse, new() => DoRequestAsync<TResponse>(GET, "_enrich/policy", ctx, null, RequestParams(requestParameters));
		///<summary>PUT on /_enrich/policy/{name} <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/put-enrich-policy-api.html</para></summary>
		///<param name = "name">The name of the enrich policy</param>
		///<param name = "body">The enrich policy to register</param>
		///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
		public TResponse PutPolicy<TResponse>(string name, PostData body, PutEnrichPolicyRequestParameters requestParameters = null)
			where TResponse : class, ITransportResponse, new() => DoRequest<TResponse>(PUT, Url($"_enrich/policy/{name:name}"), body, RequestParams(requestParameters));
		///<summary>PUT on /_enrich/policy/{name} <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/put-enrich-policy-api.html</para></summary>
		///<param name = "name">The name of the enrich policy</param>
		///<param name = "body">The enrich policy to register</param>
		///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
		[MapsApi("enrich.put_policy", "name, body")]
		public Task<TResponse> PutPolicyAsync<TResponse>(string name, PostData body, PutEnrichPolicyRequestParameters requestParameters = null, CancellationToken ctx = default)
			where TResponse : class, ITransportResponse, new() => DoRequestAsync<TResponse>(PUT, Url($"_enrich/policy/{name:name}"), ctx, body, RequestParams(requestParameters));
		///<summary>GET on /_enrich/_stats <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-stats-api.html</para></summary>
		///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
		public TResponse Stats<TResponse>(EnrichStatsRequestParameters requestParameters = null)
			where TResponse : class, ITransportResponse, new() => DoRequest<TResponse>(GET, "_enrich/_stats", null, RequestParams(requestParameters));
		///<summary>GET on /_enrich/_stats <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-stats-api.html</para></summary>
		///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
		[MapsApi("enrich.stats", "")]
		public Task<TResponse> StatsAsync<TResponse>(EnrichStatsRequestParameters requestParameters = null, CancellationToken ctx = default)
			where TResponse : class, ITransportResponse, new() => DoRequestAsync<TResponse>(GET, "_enrich/_stats", ctx, null, RequestParams(requestParameters));
	}
}